Skip to content

Run the ISO end-to-end tests in their own container - #742

Open
3alpha wants to merge 1 commit into
marc/iso-e2e-self-hostedfrom
iso-e2e-in-docker
Open

3alpha wants to merge 1 commit into
marc/iso-e2e-self-hostedfrom
iso-e2e-in-docker

Conversation

@3alpha

@3alpha 3alpha commented Nov 19, 2026

Copy link
Copy Markdown
Member

Description

A follow-up to #740, targeting its branch. It's one commit that removes the hardcoded per-workflow network values and every sudo from the ISO e2e jobs.

The guest network, QEMU and the test now run inside a throwaway Docker container per job, through the new test/e2e_in_docker.sh. The container is its own network namespace, so the TAP interface, NAT rules and dnsmasq from test/e2e_network.sh keep their fixed defaults (dne2e0, 192.168.77.0/24). Debian and Ubuntu can run on one host at once, and nothing outlives the container.

Changes compared with PR 740:

  • Removed:
    • the E2E_TAP_IFACE / E2E_HOST_IP / E2E_GUEST_IP / E2E_GUEST_MAC values per workflow;
    • the apt install and /dev/kvm chmod step;
    • the network up/down steps, the leftover-dnsmasq pkill, and every sudo.
  • Compose project name: dappnode-iso-<run_id>-<attempt>, unique per run instead of one name per workflow.
  • Root-owned files: the ISO build's files are reclaimed before checkout and removed afterwards through docker run ubuntu:24.04, not sudo.
  • test/e2e.Dockerfile: an ubuntu:24.04 image with QEMU, OVMF, sshpass, socat, dnsmasq and iptables.
  • test/e2e_in_docker.sh:
    • runs the container with NET_ADMIN, /dev/net/tun and /dev/kvm when present;
    • mounts the repo at its own path and passes E2E_* variables through;
    • keeps VM disks in an anonymous volume and gives test-output back to the caller;
    • removes the container and its volume when the job is cancelled, with an 85-minute time limit as a backstop;
    • falls back to iptables-legacy when the host lacks nftables NAT support.
  • test/e2e_network.sh: it skips the ip_forward sysctl when it is already on, because a container's /proc/sys is read-only.

What the runner needs

Only Docker and /dev/kvm, plus about 40 GB of disk. The runner must run directly on the host, not inside a container that talks to the host's Docker, because the workspace is mounted at its own path.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Other: tested locally on an arm64 Docker host, without KVM.
    • Two containers ran in parallel, both using dne2e0 / 192.168.77.10. A veth stood in for the QEMU guest. Each guest got DNS from dnsmasq, the local ping reply and HTTPS through NAT, and the host saw none of it.
    • QEMU attached to the TAP inside the container, and E2E_* variables reached the test.
    • Sending SIGTERM to test/e2e_in_docker.sh exited with 143 and left no container behind.
    • shellcheck 0.10.0 is clean. actionlint 1.7.7 reports only the existing timezone: key on the schedule.
  • ISO install: the full installs with KVM run in this PR's e2e jobs.

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings

The guest network, QEMU and the test now run inside one Docker container per
job, through test/e2e_in_docker.sh. The container is its own network
namespace, so the TAP interface, NAT rules and dnsmasq keep fixed names and
addresses, never clash with a parallel job on the same host, and go away with
the container. The runner needs only Docker and /dev/kvm: no sudo, no apt, and
no per-workflow interfaces, subnets or MACs.
@3alpha
3alpha requested a review from a team as a code owner November 19, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant